package com.dingding.study.controller;

import com.dingding.study.DTO.BannerGroupTagDTO;
import com.dingding.study.entity.Permission;
import com.dingding.study.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PermissionController {

    @Autowired
    private PermissionService permissionService;

    @GetMapping("/per")
    public List<Permission> hello(){
        return permissionService.tree();
    }
//
//    @GetMapping("/perv2")
//    public List<Permission> hellov2(){
//        return permissionService.treeV2();
//    }

    @GetMapping("/percode")
    public List<String> hello1(){
        return permissionService.querya();
    }
}
